Main Page   File List  

[b]ConnectIndication---ConnectResponse.h

00001 //  Connection Indication and Connection Response
00002 
00003 case L2CA_Indication_Union_ConnectInd_tag: {
00004         /*Receive ConnectInd - return ConnectResponse */
00005 
00006         /*Print useful message to Analysis Output window */
00007         if(IsMaster_Value())
00008                 vccPrintPdxDebugInfo("%_START_ MASTER : GBI <-received [ConnectInd] from LL - return ConnectResponse %_END_");
00009         else
00010                 vccPrintPdxDebugInfo("%_START_ SLAVE  : GBI <-received [ConnectInd] from LL - return ConnectResponse %_END_");
00011 
00012         /*TBluetoothDeviceAddress * toAddress = ConnectToAddress_Value();*/
00013 
00014         /*Have been sent ConnectIndication reply with L2CA_ConnectRsp */
00015         Identifier = L2CA_packet_in->Service.__union.Indication.__union.ConnectInd.Identifier;
00016         CID        = L2CA_packet_in->Service.__union.Indication.__union.ConnectInd.CID;
00017         BD_ADDR    = L2CA_packet_in->Service.__union.Indication.__union.ConnectInd.BD_ADDR; 
00018                                 
00019         /* Prepare L2CA_packet_out - set Tag and Contents. */
00020         L2CA_packet_out.Service.__unionTag = L2CA_Service_Union_ConnectResponse_tag;
00021         L2CA_packet_out.Service.__union.ConnectResponse.__unionTag = L2CA_ConnectResponse_Union_Response_tag;
00022 
00023         L2CA_packet_out.SourceID = 0x02;
00024         L2CA_packet_out.Service.__union.ConnectResponse.__union.Response.BD_ADDR = BD_ADDR;
00025         L2CA_packet_out.Service.__union.ConnectResponse.__union.Response.LCID = CID;
00026         L2CA_packet_out.Service.__union.ConnectResponse.__union.Response.Response = L2CA_response;
00027         L2CA_packet_out.Service.__union.ConnectResponse.__union.Response.Status = status;
00028 
00029         L2CA_Packet_Out_Post(&L2CA_packet_out);
00030                                         
00031         /*Print useful message to Analysis Output window */
00032         if(IsMaster_Value())
00033                 vccPrintPdxDebugInfo("%_START_ MASTER : GBI ->sent [ConnectResponse] to LL %_END_");
00034         else
00035                 vccPrintPdxDebugInfo("%_START_ SLAVE  : GBI ->sent [ConnectResponse] to LL %_END_");
00036         
00037         /* Slave is "connected". */
00038         connected = 1;
00039 
00040         /*Print useful message to Analysis Output window */
00041         if(IsMaster_Value())
00042                 vccPrintPdxDebugInfo("%_START_ MASTER : Master should never get here!!! %_END_");
00043         else
00044                 vccPrintPdxDebugInfo("%_START_ SLAVE  : GBI -ConnectInd --- #connected = 1# %_END_");
00045 
00046         break;
00047 }

Generated on Sun May 12 19:02:34 2002 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002